package com.bwie.controller;

import com.bwie.service.CommonService;
import com.bwie.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.swing.text.rtf.RTFEditorKit;

/**
 * @BelongsProject: E-Commerce-Month-01
 * @BelongsPackage: com.bwie.controller
 * @Author: asus
 * @CreateTime: 2025-10-24  14:15
 * @Description: CommonController
 * @Version: 1.0
 */
@RestController
@Api(tags = "公共")
@RequestMapping("/good/comm")
public class CommonController {

    @Autowired
    private CommonService commonService;


    @ApiOperation("图片上传")
    @PostMapping("upload")
    public R  upload(@RequestPart("file")MultipartFile file){
        return commonService.upload(file);
    }




}
